﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApp19.Two
{
    /// <summary>  
    /// 电灯类，对应模式中的Context类  
    /// </summary>  
    public class Light
    {
        public LightState State { get; set; }

        public Light(LightState state)
        {
            State = state;
        }

        /// <summary>  
        /// 按下电灯开关  
        /// </summary>  
        public void PressSwich()
        {
            State.PressSwich(this);
        }
    }
}
